home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / compsci / spinbran.cpt / Spinning Brain ƒ / How to use < prev    next >
Text File  |  1990-02-21  |  13KB  |  220 lines

  1.  
  2. How to use Spinning Brain
  3.  
  4.  
  5. ╥Spinning Brain╙ is a Macintosh program. It is assumed that you are familiar with the usual ways of launching and controlling a Macintosh program. If not, consult the Macintosh ╥Human interface guidelines╙. For more information on the theory and the implementation model, consult ╥Spinning Brain: An interactive program for associative recall of visual patterns╙.
  6.  
  7. ╥Spinning Brain╙: a first tour.
  8.  
  9. Launch ╥Spinning Brain╙ and open the file ╥*Car pictures╙ on the distribution disk. The file contains pictures which are read in one by one, and discretized. The pictures used as a training set are entered in the album on the lower half of Spinning Brain╒s window (see figure 1). One picture, the picture to be retrieved, is entered in Spinning Brain╒s canvas (see figure 1). You can modify this picture bit by bit yourself by clicking on it.
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. Figure 1: Screen dump from ╥Spinning Brain╙ with main components: Canvas and Album.
  34.  
  35. Clicking ╥Search╙ will start the neural net. So far the pictures are only entered in the album. Now the neural net first has to be trained on them to mould its memory. This is takes place after you clicked ╥Search╙. Then the main action of ╥Spinning Brain╙ starts. It is now processing the blurred picture which is entered in the canvas, using the dynamics of the neural net as trained by the pictures in the album. Watch how the picture gradually gets more similar to one of the pictures in the album.
  36.  
  37. You can leave ╥Spinning Brain╙ by selecting ╥Quit╙ from the file menu.
  38.  
  39.  
  40. ╥Spinning Brain╙: a closer look.
  41.  
  42. Spinning Brain operates on pictures (more specifically on bit maps). Pictures can be entered in the Album  or on the Canvas. The Album is Spinning Brain╒s training set. The canvas is its work area. 
  43.  
  44. All pictures are initially entered on the canvas. You can transport a picture from the canvas to the album by clicking ╥Note╙. The canvas will be cleared automatically. If you press the option key while clicking ╥Note╙, it will keep its current picture. 
  45.  
  46. You can enter a picture on the canvas in several ways.
  47. Ñ    You can click it pixel by pixel.
  48. Ñ    You can cut it from another application, or from the scrapbook, and paste it to the canvas.
  49. Ñ    You can drag it from the visible part of the album to the canvas.
  50. Ñ    You can load it from a file saved by Spinning Brain.
  51.  
  52. There are no editing actions possible on the pictures in the album. The album can only be cleared. 
  53. The album can be scrolled using the two arrow buttons below the album.
  54.  
  55. An additional pane on the top left is provided to show the initial configuration for the neural net, it½s starting work set.
  56.  
  57.  
  58.  
  59.  
  60. Drawing tools
  61.  
  62. Optionally, a palette of drawing tools is available. The optional drawing tools can be activated by selecting ╥Show palette╙ from the control menu.
  63. Note: the usual undo is not implemented for the drawing tools.
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. Figure 2: Screen dump from ╥Spinning Brain╙ with tool palette.
  76.  
  77.  
  78.  
  79. Inversion. The linear independence in the training set is critical for the neural nets. Since we are only working with binary data, linear dependence corresponds to negation, or black and white inversion. The inversion tool does this on the canvas.
  80.  
  81.  
  82.  
  83. Randomization. A usual application of neural nets is the reconstruction of blurred or perturbed pictures. The randomization tool can be used to perturb the picture on the canvas. The pixels on the canvas are inverted at random. The inversion probability for each pixel is 10%. Using the randomization tool with the option key pressed down repeats the action.
  84.  
  85.  
  86. Nudge down.
  87. Nudge right. 
  88.  
  89. ╥Spinning Brain╙ operates on bit patterns, not on pictures. Hence two patterns which are shifted by one place may be completely incomparable to the neural net, although they look nearly alike as a picture. However the internal correlation structure found in real pictures softens this positional dependence. Use the nudge tools to produce shifted pictures. Using the nudge tools with the option key pressed down repeats the action.
  90.  
  91.  
  92.  
  93. Selecting network types and computing strategies
  94.  
  95.  
  96. Neural networks are dynamical systems which are highly suited for parallel computation. Specialized hardware would be a first choice. ╥Spinning Brain╙ is set up to experiment with different models for parallelization. To allow this, ╥Spinning Brain╙ adds a control level above the neural net, called the searcher. The neural net provides the basic computing facility. The searcher  allocates computing tasks to the neural network. 
  97.  
  98. There can be various models for neural networks. They can differ in their dynamic model, or in the way the dynamics is implemented. ╥Spinning brain╙ comes with a general neural network prototype, for which four different implementations are supplied.
  99.  
  100. The task scheduling scheme to be activated can be chosen from the Control menu. The basic implementation of the neural network to be activated can be chosen from the Network menu. 
  101.  
  102. Note: ╥Spinning brain╙ is written for extensibility and for experimental use. The network types and the search scheduler types available may depend on the specific version. See separate documentation for the network types and the search scheduler types, if installed.
  103. The currently active network implementation and search scheduler will show their identification on the canvas dialog.
  104.  
  105. Note: The basic distribution version comes with two search schedulers, called standard and partial, and an implementation of neural nets based on a local field algorithm documented in a separate article.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. Figure 3: Main controls and display components from the canvas.
  118.  
  119.  
  120. Observing
  121.  
  122. There are three global activity monitors supplied: a  monitor of the overall activity of the pattern (i.e. the number of black pixels on the canvas), a monitor of the transition rate, and a monitor of the overlaps count with the first picture shown in the album. These monitors are only active during the search phase.
  123.  
  124.  Observers are activated using the Observe menu. All observers rescale automatically if the y-range is exceeded. A beep sound is emitted if an observer is rescaled. All observers shift left if filled up. Again, an automatic rescaling of the y-direction takes place when shifting left.
  125.  
  126. Activity reports of the neural net and the search scheduler depend on the active implementation. The observer for both are experimental and subject to change.
  127.  
  128. The observer for the default searcher (Id: Std searcher) shows the number of iterations done against clock time.
  129.  
  130. The observer for the default net (Id: LF net, random) shows the number of transitions done against the number of iterations done.
  131.  
  132.  
  133. Previewing
  134.  
  135. ╥Spinning Brain ╥ allows viewing what a completely parallel implementation would do in the next step. Hold the option key and click in in the canvas area to get an alternating grafics as long as you hold the button pressed.
  136.  
  137. Search strategies: Control->Standard
  138.  
  139. The standard search strategy is a single-CPU search operating on the global picture, following the search strategy of the neural net selected. This is the default search strategy.
  140.  
  141.  
  142. Search strategies: Control->Partial
  143.  
  144. The partial search strategy is a single-CPU search operating on the picture, following the search strategy of the neural net selected. However the pixels on which the neural net may operate at any time are restricted to a slice of the picture. The slices may vary in time. A visual feedback of the active slice is given.
  145.  
  146.  
  147. Search strategies: Control->Asynchronous
  148.  
  149. The asynchronous search strategy is a multi-CPU search operating on the picture, following the search strategy of the neural net selected. It is a variant of the partial search strategy. While one slice is processed locally, asynchronous search will try to allocate other slices to other CPUs for asynchronous processing. A visual feedback of the active slice on the local machine is given, and a change bar is used to mark a slice which has been updated from the results of a remote machine.
  150.  
  151. Note: Asynchronous processing is only available if a NetWork Processor is installed. It will only show differences from partial processing, if other NetWork accessible machines are idle in the local network zone and can be used as remote compute servers.
  152.  
  153. Search strategies: Control->Genetic
  154.  
  155. The asynchronous search strategy is a multi-CPU search operating on the picture, following the search strategy of the neural net selected. It is a variant of the asynchronous search strategy. Besides returning results to its compute client, a compute server in genetic mode will also send its results to a random other compute server for random mating. A visual feedback as in the asynchronous mode.
  156.  
  157. Note: Genetic processing is only available if a NetWork Processor is installed. It will only show differences from partial processing, if other NetWork accessible machines are idle in the local network zone and can be used as remote compute servers.
  158.  
  159.  
  160. Appendix: The NetWork Project. - Distributed computing. For those in a hurry
  161.  
  162. ╥Spinning Brain╙ is adapted to the NetWork facilities of distributed computing.
  163.  
  164. Services and facilities provided by NetWork
  165. Ñ    management of asynchronous distributed computing
  166. Ñ    idle time computing
  167. Ñ    inter-application communication
  168. Ñ    remote launching
  169. Ñ    transport shielding
  170. Ñ    low level log file support
  171.  
  172. System requirements and restrictions: The Macintosh version of NetWork runs on Macintosh Plus or higher, MacOs 6.03 or better with Multifinder. The basic version of NetWork can make use of any AppleTalk implementation (version 48 or higher), but only addresses in the local zone will be used. Note that on a Macintosh Plus generally you have to hand-install the required version of AppleTalk. AppleTalk version 48 is distributed on the AppleShare server installation disk. 
  173.  
  174. Getting started: Move the file NetWork Processor and the folder NetWork Tools into your system folder, and into that of any Macintosh on your AppleTalk network cooperating on NetWork experiments. Restart all Macintoshes which are to cooperate. For computers other than the Macintosh, follow the installation instructions specific to that machine to install a NetWork Processor.
  175. You can now run the sample program ╥Spinning Brain╙ which is located in the folder ╥NetWork Tools╙.  To develop your own software to experiment with NetWork, you have to use unit NetWork from file NetWork.p, and link with NetWorkLib.o. You can make use of the objects supplied in SchedulerUnit.p  which provide high-level access to the NetWork message system.
  176.  
  177.  
  178. Appendix: Configuring NetWork Processor
  179.  
  180. The NetWork Processor can be controlled by a control panel entry. The items that can be configured are:
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. Ñ    ╥Idle minutes before NetWork may become active╙: The time that must pass after the last user action until this Macintosh is available for NetWork use. Besides delays between 1 and 10 minutes, you can allow concurrent use of your Macintosh (╥don½t wait╙) ╨ useful during debugging ╨ or turn off remote use of NetWork (╥never╙). This last option prevents other users from creating processes on your machine. 
  200.  
  201. Ñ    ╥Log errors & info╙: If logging is enabled, NetWork Processor will write information to the file ╥NetWork.Log╙ in the system folder.
  202.  
  203. Ñ    ╥Multifinder tricks╙: Enables/disables use of a number of undocumented Multifinder calls. These calls are used to detect background activity and to kill processes if they don½t exit in time.
  204.  
  205. Ñ    ╥Background only╙: This setting can be queried by NetWork applications. NetWork slave applications should display windows and the like only if the user has turned this check box off. Unfortunately, this is only a hint, it cannot be enforced by NetWork. NetWork Processor itself uses this flag to decide whether an application is launched in front of or behind all others. The latter will not work unless ╥Multifinder tricks╙ is checked too.
  206.  
  207. Ñ    ╥Application use╙: There is another check box that can be queried by applications as ╥spare flag╙, available for experimental use.
  208.  
  209. Ñ    ╥Use folder╙: Where to search for applications if NetWork is asked to launch a program. The path may be relative to the system folder or can be a full pathname (limited to 255 characters). You can enter a folder on a file server.
  210.  
  211. Ñ    ╥Memory allocation (startup)╙: This control allows the user to configure the message buffer size that is allocated at system startup. Unlike the other options, which take effect at once, changes will take effect after reboot. When using AppleTalk, one message amounts to about 1K. The recommendation is to allocate space for messages ┼ 2K per expected communication partner.